TIP FOR OCTOBER 1995

This is a monthly segment in which Versant Object Technology touches upon some aspect of object databases.

PINNING OBJECTS IN THE VERSANT CLIENT CACHE

One of the features of an ODBMS is that of a client cache which is used to hold recently accessed objects. In Versant, the caching is dual in that pages are cached on the server while objects are cached on the client. The implementation of object level retrieval best supports this feature as it enhances flexibility and performance. The client can even set the size of its cache by changing a parameter in the front end profile. Obviously, a cache does not have infinite size. When its growth reaches a threshold, objects are then swapped out of the cache. There are times when one wants certain objects to stay in the cache and not get swapped out. How is this achieved?

The answer to this is to pin objects. Within a transaction, one way of achieving this is to use pin regions. By using the following methods:

dom->beginpinregion(0) and dom->endpinregion(0)
(beginPinRegion and endPinRegion in Smalltalk)

one can explictly pin objects in memory in between these calls. The application is free to unpin individual objects explicitly using the available API. In this way, certain "hot" objects are always kept available in the client cache. At the end of a pin region, Versant automatically unpins all objects pinned in the pin region. Pin regions can also be nested. Incidentally, commiting or rolling back a transaction unpins and flushes the objects in the cache.

The whole idea here is that certain objects in an application might always be needed for a warm traversal. Being able to deal with retrieval and locking at the object level facilitates this feature.

by Nimish Doshi


[ What's New | Products | Partners | Tech Support | About Us | Employment | Contact Us | Search | Home ]
[ C++ Solutions | SmallTalk Solutions | Internet Solutions ]

©1996 Versant Object Technology
1380 Willow Road
Menlo Park, CA 94025
USA

1-800-VERSANT
Tel 415-329-7500
Fax 415-325-2380
e-mail info@versant.com